-- GENERATED SPELL FOR [Ashtongue Primalist] --


function spell0_22847(pUnit, Event) --@Multi-Shot,n/a--
pUnit:FullCastSpellOnTarget(41187,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22847', 638, 1)
end

function spell1_22847(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(41188,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22847', 589, 1)
end

function spell2_22847(pUnit, Event) --@Sweeping Wing Clip,n/a--
pUnit:FullCastSpellOnTarget(39584,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22847', 10326, 1)
end

function spell3_22847(pUnit, Event) --@Wyvern Sting,n/a--
pUnit:FullCastSpellOnTarget(41186,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22847', 12303, 1)
end

function Sorts_22847(pUnit, Event)
local choix_sorts_22847 = math.random(0, 3)
if choix_sorts_22847 == 0 then
pUnit:RegisterEvent('spell0_22847', 1, 1)
end
if choix_sorts_22847 == 1 then
pUnit:RegisterEvent('spell1_22847', 1, 1)
end
if choix_sorts_22847 == 2 then
pUnit:RegisterEvent('spell2_22847', 1, 1)
end
if choix_sorts_22847 == 3 then
pUnit:RegisterEvent('spell3_22847', 1, 1)
end
end

function mob22847_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22847', math.random(1500, 3000), 1)
end

function mob22847_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22847_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22847_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22847, 1, 'mob22847_Action')
RegisterUnitEvent(22847, 2, 'mob22847_Leave')
RegisterUnitEvent(22847, 3, 'mob22847_Kill')
RegisterUnitEvent(22847, 4, 'mob22847_Die')
